package com.xuecheng.manage_cms.controller;

import com.xuecheng.api.cms.CmsSiteControllerApi;
import com.xuecheng.framework.model.response.QueryResponseResult;
import com.xuecheng.manage_cms.service.CmsSiteService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/cms/site")
public class CmsSiteController implements CmsSiteControllerApi {
    @Resource
     private CmsSiteService cmsSiteServiceImpl;

    /**
     * 查询所有的Cms站点信息
     *
     * @return 查询出的结果封装成统一返回对象
     */
    @Override
    @GetMapping("/list")
    public QueryResponseResult findList() {
        return cmsSiteServiceImpl.findAllSite();
    }


    public CmsSiteController(CmsSiteService cmsSiteServiceImpl){
        this.cmsSiteServiceImpl = cmsSiteServiceImpl;
    }
}
